import QtQuick 2.5

import "../../js/util.js" as Util
import "../../js/UI.js" as Style
Rectangle {
    property alias placeholderText: m_placeholderText_id.text
    property alias m_text: m_inputEdit_id.text
    property alias m_font: m_placeholderText_id.font.pointSize
    property alias m_validator: m_inputEdit_id.validator
    property alias m_horizontalAlignment: m_inputEdit_id.horizontalAlignment
    property alias m_echoMode: m_inputEdit_id.echoMode
    property alias m_inputEdit: m_inputEdit_id
    property alias m_placeHolderText: m_placeholderText_id
    property var leftMargin: Util.leftMargin * 4
    TextInput {
        id: m_inputEdit_id
        anchors {
            verticalCenter: parent.verticalCenter
            left: parent.left
            leftMargin: leftMargin
            right: parent.right
            rightMargin: Util.rightMargin * 4
        }
        font.family:Style.fontfamily
        activeFocusOnTab :true
        AText {
            id: m_placeholderText_id
            visible: {
                if (m_inputEdit_id.focus)
                    return false
                return (m_inputEdit_id.text.length == 0)
            }
            font.family: Style.fontfamily
            anchors {
                verticalCenter: parent.verticalCenter
                left: parent.left
            }
            font.pointSize: 18
            color: "#999999"
        }
        selectByMouse: true
        verticalAlignment: TextInput.AlignVCenter
        font.pointSize: 18
    }
}

